package net.villonanny.type;


public enum ResourceType {
	// String values must match language configuration keys, like in "key.wood = legno"
	WOOD("wood", "img/un/r/1.gif"),
	CLAY("clay", "img/un/r/2.gif"),
	IRON("iron", "img/un/r/3.gif"), 
	CROP("crop", "img/un/r/4.gif"),
	FOOD("food", "img/un/r/5.gif")
	;
	// HOURLY_CROP("hourly crop");
	
	private final String stringValue;
	private final String imagePath;
	
	private ResourceType(String name, String imagePath) {
		this.stringValue = name;
		this.imagePath = imagePath;
	}
	
	public String toString() {
		return stringValue;
	}

	public static ResourceType fromInt(int num) {
		return ResourceType.values()[num]; // Starts at 0
	}
	
	public int toInt() {
		return ordinal(); // Starts at 0
	}

	public String getImagePath() {
		return imagePath;
	}
	
}
